package com.litxuf.logic.core.conn;


import java.io.*;
import java.util.*;
import java.sql.*;
public class DbConnect {

	private static Connection conn; 

	public static Connection getCon() throws SQLException,
			ClassNotFoundException {
		Class.forName("net.sourceforge.jtds.jdbc.Driver");
		 conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433;DatabaseName=olympic", "sa","");
		return conn;

	}

	 

	public static void connclose() throws SQLException {
		conn.close();
	}

	/**
	 * @param args
	 * @throws ClassNotFoundException 
	 * @throws SQLException 
	 */
	public static void main(String[] args) throws SQLException, ClassNotFoundException {

		System.out.println(getCon());

	}

}